﻿define(["jQuery", "kendo", "config", "utils", "localdata",
                 "viewModels/index", "viewModels/firsttime", "viewModels/driver", "viewModels/passenger", "viewModels/company"],
       function ($, kendo, config, utils, localdata,
                viewModelIndex, viewModelFirstTime, viewModelDriver, viewModelPassenger, viewModelCompany){

           //onError
           var _onError = function (error, url, line) {
               utils.showError(error);
           };

           //init
           var init = function(){
               window.error = _onError;
               
               var kendoApp = new kendo.mobile.Application(document.body, {
                   transition: "slide",
                   initial: "index-view",
                   layout: "mobile-tabstrip",
                   loading: '<h1 class="loading-message">Loading...</h1>'
               
               });
                            
               utils.init(kendoApp);
               //data.init();
           };


           /*RETURN*/
           return {
               config: config,
               init: init,
               viewModelIndex: viewModelIndex,
               viewModelFirstTime: viewModelFirstTime,
               viewModelDriver: viewModelDriver,
               viewModelPassenger: viewModelPassenger,
               viewModelCompany: viewModelCompany
           }

       }); // --> END define